<%@page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>导师</title>
    <%@include file="common/header.jsp"%>
    </head>
<body>
<!-- page 容器 -->
<div class="page" data-router="true">
    <!-- 标题栏 -->
    <header class="bar bar-nav bgcolor nobottom">
        <button class="button button-link button-nav whitecolor pull-left" href="${ctx}/m/index.do">
            <span class="icon icon-left"></span>
        </button>
        <%@include file="common/headerPic.jsp"%>
        <a class="icon icon-search whitecolor pull-right m_right external" href="${ctx}/m/search.do?type=ds"></a>
        <h1 class="title whitecolor">导师</h1>
    </header>

    <!-- 工具栏 -->
   <!-- <nav class="bar bar-tab">
        <a class="tab-item active" href="#">
            <span class="icon icon-home"></span>
            <span class="tab-label">首页</span>
        </a>
        <a class="tab-item" href="#">
            <span class="icon icon-star"></span>
            <span class="tab-label">收藏</span>
        </a>
        <a class="tab-item" href="#">
            <span class="icon icon-settings"></span>
            <span class="tab-label">设置</span>
        </a>
    </nav>-->

    <!-- 这里是页面内容区 -->
    <div class="content whitebg infinite-scroll" data-distance="100">
        <div class="row no-gutter select_bg">
            <%--<a class="col-33 border_bottom border_right position select_condition" data-type="FocusOn">关注领域 <span class="fa fa-caret-down"></span></a>--%>
            <a class="col-50 border_bottom border_right position select_condition" data-type="FocusOn">关注领域 <span class="fa fa-caret-down"></span></a>
            <a class="col-50 border_bottom border_right position select_condition" data-type="HelpFor">辅导专长 <span class="fa fa-caret-down"></span></a>
        </div>

        <div class="select_area p_col nav_header FocusOn" style="position:absolute;z-index:2">
            <div class="search_tag <c:if test="${pager.scMap.labelFocusOn_L=='' || pager.scMap.labelFocusOn_L==null}">search_default</c:if>" >全部</div>
            <c:forEach items="${allLabelFocusOnList}" var="label">
                <div class="search_tag <c:if test="${pager.scMap.labelFocusOn_L== label.label}">search_default</c:if>" data-value="${label.label}">${label.label}</div>
            </c:forEach>
        </div>

        <div class="select_area p_col nav_header Industry" style="position:absolute;z-index:2">
            <div class="search_tag <c:if test="${pager.scMap.labelIndustry_L=='' || pager.scMap.labelIndustry_L==null}">search_default</c:if> ">全部</div>
            <c:forEach items="${allLabelIndustryList}" var="label">
                <div class="search_tag <c:if test="${pager.scMap.labelIndustry_L== label.label}">search_default</c:if>" data-value="${label.label}">${label.label}</div>
            </c:forEach>
        </div>

        <div class="select_area p_col nav_header HelpFor" style="position:absolute;z-index:2">
            <div class="search_tag <c:if test="${pager.scMap.labelHelpFor_L=='' || pager.scMap.labelHelpFor_L==null}">search_default</c:if>" >全部</div>
            <c:forEach items="${allLabelHelpForList}" var="label">
                <div class="search_tag <c:if test="${pager.scMap.labelHelpFor_L== label.label}">search_default</c:if>" data-value="${label.label}">${label.label}</div>
            </c:forEach>
        </div>

        <div class="contentList" data-totalPage="${pager.totalPage}" data-pageNum="1">
            <div class="live">
            	<a class="list-block media-list m_top toDetail no-transition" href="">
            	<ul>
            		<li class="item-content m_bottom">
            			<div class="item-media">
            				<img class="iconUrl lazy" src="images/empty.png" data-original="${Dict.prefix('UPLOAD')}${dsEmp.iconUrl}" width="60">
            			</div>
            			<div class="item-inner">
            				<div class="item-title-row">
	            				<div class="item-title"><strong class="empName"></strong>
		            				<span class="little_size">
		            					<span class="empZw"></span>
		           					</span>
	            				</div>
	            			</div>
	            			<div class="item-title">
	            				<span class="little_size">
	            					<span class="dwName"></span>
	           					</span>
	           				</div>
	            			<div class="item-title focusOn">
	            				<span class="tag"></span>
	            			</div>
	            			<div class="item-title helpFor">
					            <span class="tag"></span>
					        </div>
	            		</div>
            		</li>
            	</ul>
            	</a>
            </div>

            <%--<c:forEach items="${pager.resultList}" var="dsEmp">--%>
            <%--<div class="live">--%>
                <%--<a class="list-block media-list m_top toDetail" href="dsDetail.do?id=${dsEmp.id}">--%>
                    <%--<ul>--%>
                        <%--<li class="item-content m_bottom">--%>
                            <%--<div class="item-media">--%>
                                <%--<img class="iconUrl lazy" src="images/empty.png" data-original="${Dict.prefix('UPLOAD')}${dsEmp.iconUrl}" width="60">--%>
                            <%--</div>--%>
                            <%--<div class="item-inner">--%>
                                <%--<div class="item-title-row">--%>
                                    <%--<div class="item-title"><strong class="empName">${dsEmp.empName}</strong></div>--%>
                                <%--</div>--%>
                                <%--<div class="item-title"><span class="little_size">--%>
                                <%--<span class="dwName">${dsEmp.dwName}</span>--%>
                                <%--&nbsp; &nbsp;--%>
                                <%--<span class="empZw">${dsEmp.zw}</span>--%>
                                <%--</span></div>--%>
                                    <%--<c:forEach items="${ fn:split(dsEmp.labelFocusOn,'|')}" varStatus="status" var="label">--%>
                                        <%--<c:if test="${status.count%3==1 || status.begin}">--%>
                                            <%--<div class="item-title focusOn">--%>
                                        <%--</c:if>--%>
                                            <%--<c:if test="${label!=''}">--%>
                                                 <%--<span class="tag"> ${label}</span>--%>
                                            <%--</c:if>--%>
                                        <%--<c:if test="${status.count%3==0 || status.end}">--%>
                                           <%--</div>--%>
                                        <%--</c:if>--%>
                                    <%--</c:forEach>--%>
<%--<!-- --%>
                                <%--<c:forEach items="${ fn:split(dsEmp.labelIndustry,'|')}" varStatus="status" var="label">--%>
                                    <%--<c:if test="${status.count%3==1 || status.begin}">--%>
                                        <%--<div class="item-title">--%>
                                    <%--</c:if>--%>
                                        <%--<c:if test="${label!=''}">--%>
                                            <%--<span class="tag">${label}</span>--%>
                                        <%--</c:if>--%>
                                    <%--<c:if test="${status.count%3==0 || status.end}">--%>
                                        <%--</div>--%>
                                    <%--</c:if>--%>
                                <%--</c:forEach>--%>
 <%---->                                --%>
                                <%--<c:forEach items="${ fn:split(dsEmp.labelHelpFor,'|')}" varStatus="status" var="label">--%>
                                    <%--<c:if test="${status.count%3==1 || status.begin}">--%>
                                        <%--<div class="item-title helpFor">--%>
                                    <%--</c:if>--%>
                                        <%--<c:if test="${label!=''}">--%>
                                            <%--<span class="tag">${label}</span>--%>
                                        <%--</c:if>--%>
                                    <%--<c:if test="${status.count%3==0 || status.end}">--%>
                                        <%--</div>--%>
                                    <%--</c:if>--%>
                                <%--</c:forEach>--%>
                            <%--</div>--%>
                        <%--</li>--%>
                    <%--</ul>--%>
                <%--</a>--%>
            <%--</div>--%>
            <%--</c:forEach>--%>
        </div>

        <!-- preloader -->
        <%--<c:if test="${pager.totalPage>=2}">--%>
            <div class="infinite-scroll-preloader">
                <div class="preloader"></div>
            </div>
        <%--</c:if>--%>

</div>
</div>

<%@include file="common/panel.jsp"%>
</body>
</html>
<%@include file="common/footer.jsp"%>
<%@include file="common/nav_header_new.jsp"%>
<script>
    $.init();

    var objBase = $(".contentList > .live").eq(0).clone();
    var contentList = $(".contentList");
    contentList.empty();

    var loading = false;

    function addItems(data,content) {
        $.each(data.resultList,function(){
            var obj = objBase.clone();
            obj.find(".empName").text(this.empName);
            obj.find(".dwName").text(this.dwName);
            obj.find(".empZw").text(this.zw);
            var focusOn = obj.find(".focusOn").empty();
            if(this.labelFocusOn!=null) {
                var labelFocusOnList = this.labelFocusOn.split("|");
                $.each(labelFocusOnList, (function () {
                    if(this!='') {
                        var html = '<span class="tag">' + this + '</span>';
                        focusOn.append(html)
                    }
                }));
            }
            var helpFor = obj.find(".helpFor").empty();
            if(this.labelHelpFor!=null) {
                var labelHelpForList = this.labelHelpFor.split("|");
                $.each(labelHelpForList, (function () {
                    if(this!='') {
                        var html = '<span class="tag">' + this + '</span>';
                        //helpFor.append(html)
                    }
                }));
            }
            obj.find(".toDetail").attr("href","${ctx}/m/dsDetail.do?id="+this.id);
            obj.find(".iconUrl").attr("data-original","${Dict.prefix('UPLOAD')}"+this.iconUrl);
            content.append(obj);
        });
        var pageNum = parseInt(content.attr("data-pageNum"))+1;
        content.attr("data-pageNum",pageNum);
        lazyLoad();
    }

    function queryUrl(){
//        return "dsPagerM.do"
        var Industry = $(".nav_header.Industry > .search_default").data("value")==undefined?"":$(".nav_header.Industry > .search_default").data("value");
        var FocusOn = $(".nav_header.FocusOn > .search_default").data("value")==undefined?"":$(".nav_header.FocusOn > .search_default").data("value");
        var HelpFor = $(".nav_header.HelpFor > .search_default").data("value")==undefined?"":$(".nav_header.HelpFor > .search_default").data("value");
        return "${ctx}/m/dsPagerM.do?map.labelFocusOn_L="+FocusOn+"&map.labelIndustry_L="+Industry+"&map.labelHelpFor_L="+HelpFor+"&map.title_I=${pager.scMap.title_I}";
    }
//    function queryData(){
//        return {};
//        var Industry = $(".nav_header.Industry > .search_default").data("value")==undefined?"":$(".nav_header.Industry > .search_default").data("value");
//        var FocusOn = $(".nav_header.FocusOn > .search_default").data("value")==undefined?"":$(".nav_header.FocusOn > .search_default").data("value");
//        var HelpFor = $(".nav_header.HelpFor > .search_default").data("value")==undefined?"":$(".nav_header.HelpFor > .search_default").data("value");
//        var data = {};
//        var scMap = {};
//        scMap.labelFocusOn_L = FocusOn;
//        scMap.labelIndustry_L = Industry;
//        scMap.labelHelpFor_L = HelpFor;
//        data.scMap = scMap;
//        return data;
//    }

    ajaxTODO(null,contentList,true);

</script>